home *** CD-ROM | disk | FTP | other *** search
/ Sunday Savers: Sharing Fun! I Know My Savior Lives / Sunday Savers: Sharing Fun! I Know My Savior Lives.iso / mac / Xtras / Buddy API 1.6 / Buddy API Docs.swf / texts / 1528.txt < prev    next >
Encoding:
Text File  |  2004-08-31  |  3.7 KB  |  157 lines

  1. 126
  2. --- RECORDSEPARATOR ---
  3.  
  4. --- RECORDSEPARATOR ---
  5. CopyFile 
  6. --- RECORDSEPARATOR ---
  7. Platform:
  8. --- RECORDSEPARATOR ---
  9.  
  10. --- RECORDSEPARATOR ---
  11. Windows and Macintosh
  12. --- RECORDSEPARATOR ---
  13.  
  14. --- RECORDSEPARATOR ---
  15. Description:
  16. --- RECORDSEPARATOR ---
  17.  
  18. --- RECORDSEPARATOR ---
  19. baCopyFile copies a file.
  20. --- RECORDSEPARATOR ---
  21.  
  22. --- RECORDSEPARATOR ---
  23. Usage:
  24. --- RECORDSEPARATOR ---
  25.  
  26. --- RECORDSEPARATOR ---
  27. Result = baCopyFile( SourceFile , DestFile , Overwrite )
  28. --- RECORDSEPARATOR ---
  29.  
  30. --- RECORDSEPARATOR ---
  31. Arguments:
  32. --- RECORDSEPARATOR ---
  33.  
  34. --- RECORDSEPARATOR ---
  35. String, String, String. 
  36. --- RECORDSEPARATOR ---
  37. SourceFile is the file to copy. 
  38. --- RECORDSEPARATOR ---
  39. DestFile is the name to copy it to. 
  40. --- RECORDSEPARATOR ---
  41. Overwrite determines how the copy is done. Can be: 
  42. --- RECORDSEPARATOR ---
  43. "Always" 
  44. --- RECORDSEPARATOR ---
  45. always copies the file 
  46. --- RECORDSEPARATOR ---
  47. "IfNewer" 
  48. --- RECORDSEPARATOR ---
  49. copies the file if SourceFile is newer than DestFile 
  50. --- RECORDSEPARATOR ---
  51. "IfNotExist" 
  52. --- RECORDSEPARATOR ---
  53. copies only if DestFile does not already exist
  54. --- RECORDSEPARATOR ---
  55.  
  56. --- RECORDSEPARATOR ---
  57. Returns:
  58. --- RECORDSEPARATOR ---
  59.  
  60. --- RECORDSEPARATOR ---
  61. Integer. 
  62. --- RECORDSEPARATOR ---
  63. Returns 0 if the file was copied successfully, otherwise one of these: 
  64. --- RECORDSEPARATOR ---
  65. --- RECORDSEPARATOR ---
  66. Invalid Source file name 
  67. --- RECORDSEPARATOR ---
  68. --- RECORDSEPARATOR ---
  69. Invalid Dest file name 
  70. --- RECORDSEPARATOR ---
  71. --- RECORDSEPARATOR ---
  72. Error reading the Source file 
  73. --- RECORDSEPARATOR ---
  74. --- RECORDSEPARATOR ---
  75. Error writing the Dest file 
  76. --- RECORDSEPARATOR ---
  77. --- RECORDSEPARATOR ---
  78. Couldn't create directory for Dest file 
  79. --- RECORDSEPARATOR ---
  80. --- RECORDSEPARATOR ---
  81. Dest file exists 
  82. --- RECORDSEPARATOR ---
  83. --- RECORDSEPARATOR ---
  84. Dest file is newer that Source f
  85. --- RECORDSEPARATOR ---
  86. ile
  87. --- RECORDSEPARATOR ---
  88.  
  89. --- RECORDSEPARATOR ---
  90. Examples:
  91. --- RECORDSEPARATOR ---
  92.  
  93. --- RECORDSEPARATOR ---
  94. Director: 
  95. --- RECORDSEPARATOR ---
  96. set OK = baCopyFile("c:\data\student.dat", "c:\data\backup\student.dat", "IfNewer") 
  97. --- RECORDSEPARATOR ---
  98. Authorware: 
  99. --- RECORDSEPARATOR ---
  100. OK := baCopyFile("c:\\data\\student.dat", "c:\\data\\backup\\student.dat", "IfNewer")
  101. --- RECORDSEPARATOR ---
  102.  
  103. --- RECORDSEPARATOR ---
  104. Notes:
  105. --- RECORDSEPARATOR ---
  106.  
  107. --- RECORDSEPARATOR ---
  108. By default, this function will not overwrite an existing file if that file is marked as 
  109. --- RECORDSEPARATOR ---
  110. read-only. However, by adding "+"  to the "Always" and "IfNewer" options ( eg 
  111. --- RECORDSEPARATOR ---
  112. "Always+" or "IfNewer+"), the files will be overwritten if they are read-only. 
  113. --- RECORDSEPARATOR ---
  114. A return value of 6 (Dest file exists) can only be returned when Overwrite is 
  115. --- RECORDSEPARATOR ---
  116. "IfNotExist". 
  117. --- RECORDSEPARATOR ---
  118. A return value of 7 (Dest file is newer than Source file) can only be returned when 
  119. --- RECORDSEPARATOR ---
  120. Overwrite is "IfNewer". The other return values can be returned for all Overwrite 
  121. --- RECORDSEPARATOR ---
  122. options. 
  123. --- RECORDSEPARATOR ---
  124. The "IfNewer" option operates as follows on
  125. --- RECORDSEPARATOR ---
  126.  Windows
  127. --- RECORDSEPARATOR ---
  128. : if both files have internal 
  129. --- RECORDSEPARATOR ---
  130. version numbers, then these numbers are used for comparison, otherwise the 
  131. --- RECORDSEPARATOR ---
  132. dates of the two files are used for comparison. On
  133. --- RECORDSEPARATOR ---
  134.  Macintosh
  135. --- RECORDSEPARATOR ---
  136. , only the file dates 
  137. --- RECORDSEPARATOR ---
  138. are used for comparison. 
  139. --- RECORDSEPARATOR ---
  140. The DestFile must contain the full name of the file, not just the name of the folder it 
  141. --- RECORDSEPARATOR ---
  142. is being copied to.
  143. --- RECORDSEPARATOR ---
  144.  
  145. --- RECORDSEPARATOR ---
  146. See also:
  147. --- RECORDSEPARATOR ---
  148.  
  149. --- RECORDSEPARATOR ---
  150. baCopyXFiles